import {
  K_INTERVAL_REAL_TIME, K_INTERVAL_ONE_MINUTE, K_INTERVAL_THREE_MINUTES, K_INTERVAL_FIVE_MINUTES,
  K_INTERVAL_FIFTEEN_MINUTES, K_INTERVAL_THIRTY_MINUTES, K_INTERVAL_ONE_HOUR, K_INTERVAL_TWO_HOURS,
  K_INTERVAL_FOUR_HOURS, K_INTERVAL_SIX_HOURS, K_INTERVAL_TWELVE_HOURS,
  K_INTERVAL_ONE_DAY, K_INTERVAL_ONE_WEEK, K_INTERVAL_ONE_MONTH
} from '../../../redux/actions/tradeChartAction'
import { intl } from '../../../intl/intl'

export const intervals = {
  [K_INTERVAL_REAL_TIME]: '1',
  [K_INTERVAL_ONE_MINUTE]: '1',
  [K_INTERVAL_THREE_MINUTES]: '3',
  [K_INTERVAL_FIVE_MINUTES]: '5',
  [K_INTERVAL_FIFTEEN_MINUTES]: '15',
  [K_INTERVAL_THIRTY_MINUTES]: '30',
  [K_INTERVAL_ONE_HOUR]: '60',
  [K_INTERVAL_TWO_HOURS]: '120',
  [K_INTERVAL_FOUR_HOURS]: '240',
  [K_INTERVAL_SIX_HOURS]: '360',
  [K_INTERVAL_TWELVE_HOURS]: '720',
  [K_INTERVAL_ONE_DAY]: 'D',
  [K_INTERVAL_ONE_WEEK]: 'W',
  [K_INTERVAL_ONE_MONTH]: 'M'
}

export const minuteIntervalKeys = [
  K_INTERVAL_ONE_MINUTE, K_INTERVAL_THREE_MINUTES, K_INTERVAL_FIVE_MINUTES,
  K_INTERVAL_FIFTEEN_MINUTES, K_INTERVAL_THIRTY_MINUTES
]

export const hourIntervalKeys = [
  K_INTERVAL_ONE_HOUR, K_INTERVAL_TWO_HOURS, K_INTERVAL_FOUR_HOURS,
  K_INTERVAL_SIX_HOURS, K_INTERVAL_TWELVE_HOURS
]

export const otherIntervalKeys = [
  K_INTERVAL_ONE_DAY, K_INTERVAL_ONE_WEEK, K_INTERVAL_ONE_MONTH
]

export const minuteSelectDataSource = [
  { key: K_INTERVAL_ONE_MINUTE, text: intl(K_INTERVAL_ONE_MINUTE) },
  { key: K_INTERVAL_THREE_MINUTES, text: intl(K_INTERVAL_THREE_MINUTES) },
  { key: K_INTERVAL_FIVE_MINUTES, text: intl(K_INTERVAL_FIVE_MINUTES) },
  { key: K_INTERVAL_FIFTEEN_MINUTES, text: intl(K_INTERVAL_FIFTEEN_MINUTES) },
  { key: K_INTERVAL_THIRTY_MINUTES, text: intl(K_INTERVAL_THIRTY_MINUTES) }
]

export const hourSelectDataSource = [
  { key: K_INTERVAL_ONE_HOUR, text: intl(K_INTERVAL_ONE_HOUR) },
  { key: K_INTERVAL_TWO_HOURS, text: intl(K_INTERVAL_TWO_HOURS) },
  { key: K_INTERVAL_FOUR_HOURS, text: intl(K_INTERVAL_FOUR_HOURS) },
  { key: K_INTERVAL_SIX_HOURS, text: intl(K_INTERVAL_SIX_HOURS) },
  { key: K_INTERVAL_TWELVE_HOURS, text: intl(K_INTERVAL_TWELVE_HOURS) }
]
